import request from "../util/request.js";

export function _add(task) {
    return request({
        url: "/task/add",
        method: "POST",
        data: task
    })
}

export function _remove(id) {
    return request({
        url: `/task/remove/${id}`,
        method: "GET",
    })
}

export function _enable(id) {
    return request({
        url: `/task/enable/${id}`,
        method: "GET",
    })
}

export function _unEnable(id) {
    return request({
        url: `/task/unEnable/${id}`,
        method: "GET",
    })
}

export function _list(id) {
    return request({
        url: `/task/list/${id}`,
        method: "GET",
    })
}

export function _getOne(id) {
    return request({
        url: `/task/getOne/${id}`,
        method: "GET",
    })
}